//
//  Resource.h
//  RepasoApp
//
//  Created by Vicente Vicens Camarena on 02/10/11.
//  Copyright 2011 Imathink World, S.L.N.E. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <CommonCrypto/CommonDigest.h>

@interface Resource : NSObject

@property (nonatomic, retain) NSString *resourceId;
@property (nonatomic, retain) NSString *resourceTitle;
@property (nonatomic, retain) NSString *resourceDescription;
@property (nonatomic, retain) NSString *resourceURL;
@property (nonatomic, retain) NSString *resourceURL2;
@property (nonatomic, retain) NSString *resourceType;
@property (nonatomic, readonly) UIImage *resourceImage;
@property (nonatomic, retain) NSData * data;

- (id)initWithDictionary:(NSDictionary *)dictionary; //Designated initializer
- (NSString *) localPath;

+ (Resource *)resourceWithDictionary:(NSDictionary *)dictionary;
+ (NSString*)md5HexDigest:(NSString*)input;
- (BOOL)isCached;

@end
